// 自动化工程
//声明对象
const components = [
    
];
// 建立上下文关系
const files = require.context('../../views/',true,/\.js$/);
//循环对象
files.keys().map(key => {
    if(key.includes("./index/")||key.includes("./login/")) {return false;}
    const splitFilesName = key.split('.');
    //获取路径
    const path = `/home${splitFilesName[1].toLowerCase()}`;
    //获取组件
    const component = files(key).default;
    const jsonObj = {
        path,
        component,
    }
    components.push(jsonObj);
});

export default components